﻿#pragma once
#include "MdbStructs.h"
#include <atomic>
#include <list>


class MdbSubscriber
{
public:
	MdbSubscriber()
		:m_Connected(false)
	{
	}
	virtual void TruncateTables() {}
	virtual void OnTickInsert(mdb::Tick* record) {}
	virtual void OnTickErase(mdb::Tick* record) {}
	virtual void OnTickEraseByInstrumentIDIndex(mdb::Tick* record) {}
	virtual void OnTickUpdate(mdb::Tick* record) {}
	virtual void OnTickReplace(mdb::Tick* record) {}
	virtual void OnTickTruncate() {}
	
	virtual void OnBarInsert(mdb::Bar* record) {}
	virtual void OnBarErase(mdb::Bar* record) {}
	virtual void OnBarEraseByInstrumentIDIndex(mdb::Bar* record) {}
	virtual void OnBarEraseByTradingDayIndex(mdb::Bar* record) {}
	virtual void OnBarUpdate(mdb::Bar* record) {}
	virtual void OnBarReplace(mdb::Bar* record) {}
	virtual void OnBarTruncate() {}
	

public:
	std::atomic<bool> m_Connected;
};

